import { useRequest } from '@/hooks';
import { getCompanyDetail } from '@/pages/Organization/OrgFlow/services';

const useCompanyData = organizationCode => {
    const { data = {} } = useRequest(() => getCompanyDetail(organizationCode), {
        ready: !!organizationCode,
        refreshDeps: [organizationCode],
        formatResult: res => res?.data
    });

    return { data };
};

export default useCompanyData;
